/**
 * long description for the file
 *
 * @summary 登录
 * @author wu[308822989@qq.com]
 *
 * Created at     : 2018-12-17 14:23:20
 * Last modified  : 2018-12-17 15:04:41
 */

var app = new Vue({
    el: '#app',
    data: {
        code: '',
        pwd: ''
    },
    methods: {
        login: function () {
            axios.post('', {code: this.code, pwd: this.pwd}).then(function (res) {
                if (res.status == 200 && res.status.data && res.status.data.code === 0) {
                    //  登录成功
                    window.location.href = '/';
                } else {
                    //  登录失败
                    $.toast(res.data.msg || "登录失败",'text');
                }
            });
        }
    }
});
